#include "main.h"


 STATE_STATUS eSysStateStatus;
 SYS_STATE    eSysCurState;
 SYS_STATE    eSysNextState;
 SYS_STATE    eSysLastState;
    
void f_SysState_StateJump()
{
    if(eSysCurState!=eSysNextState&&eSysStateStatus==STATUS_QUITE)
    {
        eSysLastState=eSysCurState;
        eSysCurState=eSysNextState;

        eSysStateStatus=STATUS_ENTER;
    }
}
void f_SysState_StateSet(SYS_STATE eSetState)
{
    if(eSysCurState!=eSetState&&eSysNextState!=eSetState&&eSysStateStatus==STATUS_RUN)
    {
        eSysNextState=eSetState;
        eSysStateStatus=STATUS_QUITE;
    }   
		f_Flow_SysState_Routine();
}
void f_SysState_Init(void)
{
	eSysStateStatus =STATUS_ENTER;
    eSysCurState = SYS_STATE_START;
    eSysNextState = SYS_STATE_START;
    eSysLastState = SYS_STATE_START;
}
